package com.bungarus.model;

import java.util.List;

/**
 * Created by tang on 2018/12/2.
 */
public class Group implements PageItem {
    private static final SnowflakeIdMaker idMaker = new SnowflakeIdMaker(0,0);
    //group name
    private String name;
    //group unique id
    private long _id;
    //tenant id
    private long tenantId;
    //memebers
    private List<Member> members;

    public static Builder newBuilder() {
        return new Builder();
    }

    public static class Builder {
        private Group group = new Group();
        public Builder id(long id) {
            group.set_id(id);
            return this;
        }

        public Builder name(String name) {
            group.setName(name);
            return this;
        }

        public Builder tenant(long tenantId) {
            group.setTenantId(tenantId);
            return this;
        }

        public Builder members(List<Member> members) {
            group.setMembers(members);
            return this;
        }

        public Group build() {
            return group;
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long get_id() {
        return _id;
    }

    public void set_id(long id) {
        this._id = id;
    }

    public List<Member> getMembers() {
        return members;
    }

    public void setMembers(List<Member> members) {
        this.members = members;
    }

    public long getTenantId() {
        return tenantId;
    }

    public void setTenantId(long tenantId) {
        this.tenantId = tenantId;
    }
}

